def m3u8_convert(url1, url2):
    '''
    url1 https://s10.fsvod1.com/20240619/YwHpcV7L/index.m3u8
    url2 /20240619/YwHpcV7L/2000kb/hls/index.m3u8
    '''
    if "http" in url2:
        return url2
    else:
        url1 = url1.split('/')[:-1]
        url2 = url2.split('/')
        # print("url2",url2)
        # print("url1",url1[:3])
        if "hls" in url2:
            url1 = url1[:3]
            return '/'.join(url1)+'/'.join(url2)
        for i in url2:
            if i != "":
                if i in url1:
                    pass
                else:
                    url1.append(i)

        return '/'.join(url1)


s1="https://vip.kuaikan-play1.com/20230308/G5pwwH8E/540kb/index.m3u8"


s2 = "/hls/20240605/k7Yq0qqa/11614kb/DiQ3gztt.ts"

print(m3u8_convert(s1,s2))